import request from '@/utils/request';

const URL = '/dataReplay';
// 保存回放任务
const API = {

    saveTask (params?: any) {
        return request<any> ({
            url: `${URL}/saveTask`,
            method: 'POST',
            data: params,
        })
    },
    queryAllTask(params?: any) {
        return request<any> ({
            url: `${URL}/queryAllTask`,
            method: 'Get',
            data: params,
        })
    },
    deleteTask(id?:any) {
        return request<any> ({
            url: `${URL}/deleteTask/${id}`,
            method: 'Delete',
        })
    },
    taskNameCheck(name?:any) {
        return request<any> ({
            url: `${URL}/task/exists/${name}`,
            method: 'GET',
        })
    },
    updateTask(params?:any) {
        return request<any> ({
            url: `${URL}/updateTask`,
            method: 'PUT',
            data: params
        })
    }
}

export default API;
